<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>易优名品</title>
    <link rel="stylesheet" href="__LayUI__/css/layui.css">
    <link rel="stylesheet" href="__Admin__/css/admin.scss">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    {include file="layout/head" /}

    {include file="layout/sidebar" /}

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div id="mainContain">
            <form method='post' class='layui-form' enctype="multipart/form-data">
                <input type="hidden" value={$res.id} name="id">
                <div class="layui-form-item">
                    <label class="layui-form-label">标题</label>
                    <div class="layui-input-block">
                        <input type="text" value={$res.title} name="title" required=""  placeholder="请输入标题" autocomplete="off" class="layui-input">
                    </div>
                </div>
                 <div class="layui-form-item">
                    <label class="layui-form-label">作者</label>
                    <div class="layui-input-block">
                      <input value={$res.author} type="text" name="author" required=""  placeholder="请输入作者" autocomplete="off" class="layui-input">
                    </div>
                </div>
                 <div class="layui-form-item">
                    <label class="layui-form-label">关键词</label>
                    <div class="layui-input-block">
                      <input value={$res.keywords} type="text" name="keywords" required=""  placeholder="请输入关键词" autocomplete="off" class="layui-input">
                    </div>
                </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">描述</label>
                    <div class="layui-input-block">
                        <textarea   name='desc' class='layui-textarea '>{$res.desc}</textarea>
                    </div>
                </div>
                 <div class="layui-form-item">
                    <label class="layui-form-label">缩略图</label>
                    <div class="layui-input-block">
                        <input type="file" name='pic' class=''>
                    </div>
                </div>
                 <div class="layui-form-item">
                    <label class="layui-form-label">栏目</label>
                    <div class="layui-input-block">
                        <select name="cateid" lay-verify="">
                           <option value="">请选择类型</option> 
                           {volist name="cateres" id="cateres"}
                            <option value="{$cateres.id}" {if condition="$cateres['id'] eq $res['cateid']"} selected {/if}>{$cateres.catename}</option> 
                           {/volist}
                        </select>   
                    </div>
                </div>
                 <div class="layui-form-item">
                    <label class="layui-form-label">描述</label>
                    <div class="layui-input-block">
                        <textarea id='editor' name="content" required="">
                            {$res.content}
                        </textarea>
                    </div>
                </div>
                
                    <div class="layui-form-item">
                    <div class="layui-input-block">
                      <button class="layui-btn" >立即提交</button>
                      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            
            </form>
          
      
        </div>
    </div>

    {include file="layout/footer" /}

</div>
<script src="__LayUI__/layui.js"></script>
<!-- 配置文件 -->
<script type="text/javascript" src="__Ueditor__/utf8-php/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__Ueditor__/utf8-php/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('editor',{
        initialFrameWidth :900,
        zIndex:888
    });
</script>
<script>
    layui.use(['element','upload','form'], function(){
         var upload = layui.upload;
   
     upload.render({
        elem: '#upload'
        
        ,done: function(res, index, upload){ //上传后的回调

        } 
        //,accept: 'file' //允许上传的文件类型
        //,size: 50 //最大允许上传的文件大小
        //,……
      });
});
</script>
</body>
</html>